<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/faq_new.js"></script> 
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
<title>评论管理</title>
<script>
function createHtml( table, field_id, key_id ,D_ID){
    if(D_ID != 0)
	{
		
		$.get('../bin/docList_'+table+'.php?action=pub&TID='+table+'&field_id='+field_id+'&key_id='+key_id+'&ajax_pub=1',function(data){
			if( parseInt(data) == 1 ){
				$("#preview_"+key_id).show();
				alert( '生成成功!' );
				window.location.href = window.location.href;
			}else{
				alert( '生成失败!' );
			}
			
		});
	}else
	{
	   document.location.href = '../bin/doc_'+table+'.php?field_id='+field_id+'&key_id='+key_id;
	}
}
</script>
</head>
<body >
<h1>
<span class="action-span">
<a href="/wondershare/faq_syn.php?action=syn_type&web_type=<{$web_type}>">同步分类</a>
</span>
<span class="action-span">
<a href="/wondershare/faq_syn.php?action=syn_new&web_type=<{$web_type}>">同步FAQ文章</a>
</span>
<span class="action-span">
<a href="/wondershare/faq_new.php?action=generate_order&web_type=<{$web_type}>">生成Order_Support文章</a>
</span>

<span class="action-span">
<a href="/wondershare/faq_new.php?action=product_faq&web_type=<{$web_type}>">生成产品FAQ文章模板</a>
</span>
<{ if $web_type == 2}>
    <span class="action-span">
    <a  style="color:#F00" href="/wondershare/faq_syn.php?action=allCreateHtml&web_type=<{$web_type}>">全站生成</a>
    </span>
<{/if}>

<div style="clear:both"></div>
</h1>
<form id="myform" name="myform" method="POST" action="/wondershare/faq_new.php?action=index&web_type=<{$web_type}>">

    <img height="22" border="0" width="26" alt="SEARCH" src="images/icon_search.gif">
        <!-- 分类 -->
    分类： <select name="new_type" style="width:150px;">
	<option value="0">所有分类</option>
	<{foreach from=$category_info item=rows}>
	<option value="<{$rows.type_id}>" <{if $rows.type_id == $new_type}> selected="selected" <{/if}> ><{$rows.type_name}></option>
	 <{/foreach}>
	</select>
    <!-- 推荐 -->
    问题原因： <select name="new_reason_id" >
           	 <option value='all' >请选择原因</option>
  		 	 <option value="11" <{if $new_reason_id == '11'}> selected="selected" <{/if}> >其它</option> 
             <option value="10" <{if $new_reason_id == '10'}> selected="selected" <{/if}>  >常见问题</option> 
			 <option value="7" <{if $new_reason_id == '7'}> selected="selected" <{/if}> >用户使用问题</option> 
             <option value="9" <{if $new_reason_id == '9'}> selected="selected" <{/if}> >用户系统配置问题</option> 
             <option value="8" <{if $new_reason_id == '8'}> selected="selected" <{/if}> >软件本身存在BUG</option> 
              </select>  
	解决状态： <select name="new_status" >
           	 <option value='all' >请选择状态</option>
  		 	 <option value="0" <{if $new_status == '0'}> selected="selected" <{/if}> >待解决</option> 
             <option value="1" <{if $new_status == '1'}> selected="selected" <{/if}> >已解决</option> 
			 <option value="2" <{if $new_status == '2'}> selected="selected" <{/if}> >无法解决</option> 
             </select>  
	是否重要： <select name="new_important" >
           	 <option value='all' >请选择状态</option>
  		 	 <option value="0" <{if $new_important == '0'}> selected="selected" <{/if}> >不重要</option> 
             <option value="1" <{if $new_important == '1'}> selected="selected" <{/if}> >重要</option> 
             </select> 		  
    cbs产品id：<input type="text" size="5" name="p_cbsid" value="<{$p_cbsid}>">
	文章ID：<input type="text" size="5" name="new_id" value="<{$new_id}>">
    标题：<input type="text"  style="width:100px;" name="new_title" value="<{$new_title|escape}>">
    <input  type="hidden" id="web_type" name="web_type"  value="<{$web_type}>"/>
    <input type="submit" class="button" name="search" value=" 搜索 ">

</form>
<table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div">
<tbody>
  <tr>
    <th align="center">文章ID</th>
	<th align="center">FAQ标题</th>
	<th align="center">FAQ类别</th>
	<th align="center">解决状态</th>
	<th align="center">是否发布</th>
	<th align="center">访问次数</th>
	<th align="center">有用/无用</th>
	<th align="center">客户反馈</th>
	<th align="center">是否推荐到首页</th>
	<th align="center">是否重要</th>
	<th align="center">排序</th>
    <th align="center">发布人</th>
    <th align="center">发布时间</th>
    <th align="center">修改人</th>
    <th align="center">修改时间</th>
	<th align="center">操作</th>

  </tr>
<{foreach from=$new_info item=rows}>
  <tr align="center"  id="tr_<{$rows.id}>">
	<td width="5%" align="center">
    <{$rows.id}>
	</td>
	<td width="18%" align="center">
    <{$rows.title|escape}>
	</td>
	<td width="6%" align="center">
    <{$rows.type_name|escape}>
	</td>
	<td width="5%" align="center">
	<{if $rows.resolve_status == 0}>待解决<{elseif $rows.resolve_status == 1}>已解决<{else}>无法解决<{/if}>
	</td>
	<td width="5%" align="center">
	<{if $rows.status == 0}>未发布<{else}>已发布<{/if}>
	</td>
 	<td width="5%" align="center">
    <{$rows.hits}>
	</td>  
	<td width="5%" align="center">
    <{$rows.helpful_points}>/<{$rows.useless_points}>
	</td> 
	<td width="5%" align="center">
	 <{$rows.suggestion_nums}>
	</td>
	<td width="5%" align="center">
     <img id="recommend_<{$rows.id}>" onclick="change_image('recommend_<{$rows.id}>',<{$rows.id}>,'new_recommend')" <{if $rows.is_recommend_index == 1}> src="/wondershare/images/yes.gif" <{else}> 
	src="/wondershare/images/no.gif" <{/if}> />
	</td> 
	<td width="5%" align="center">
     <img id="important_<{$rows.id}>" onclick="change_image('important_<{$rows.id}>',<{$rows.id}>,'new_important')" <{if $rows.is_important == 1}> src="/wondershare/images/yes.gif" <{else}> 
	src="/wondershare/images/no.gif" <{/if}> />
	</td> 
	<td width="5%" align="center" id="td_order_<{$rows.id}>">
	<span onmouseout="check_css('sort_order_<{$rows.id}>',0);" onmouseover="check_css('sort_order_<{$rows.id}>',1);"      
	onclick="check_info('<{$rows.id}>','sort_order_<{$rows.id}>','td_order_<{$rows.id}>',60,'new_sort');"  id="sort_order_<{$rows.id}>" ><{$rows.new_sort}></span>
	</td> 
   
	<td width="5%" align="center">
    <{$rows.release_ws_id}>
	</td> 
	<td width="5%" align="center">
     <{$rows.released}>
	</td> 
     <td width="5%" align="center">
    <{$rows.update_user}>
	</td> 
	<td width="5%" align="center">
     <{$rows.update_time}>
	</td> 
    
	<td width="11%" align="center">
	<a href="/wondershare/faq_new.php?action=edit&act=edit&new_id=<{$rows.id}>&web_type=<{$web_type}>"  >查看</a>&nbsp;&nbsp;
	<{if $rows.type_id == 6 }> 
	<a  style="color:#009933"  id="preview_<{$rows.id}>" target="_blank" href="http://check.wondershare.com<{$rows.url}>"><{if $rows.D_ID}>预览<{/if}></a>&nbsp;&nbsp;
	<{elseif $rows.type_id == 1 || $rows.type_id == 2  || $rows.type_id == 4 || $rows.type_id == 7 || $rows.type_id == 8 }>
	<a  style="color:#009933"  id="preview_<{$rows.id}>" target="_blank" href="http://check.wondershare.com<{$rows.order_url}>"><{if $rows.order_D_ID}>预览<{/if}></a>&nbsp;&nbsp;
	<{else}>
	<{/if}> 
	
	<a style="color:#009933"   href="javascript:void(0)" 
	<{if $rows.type_id == 6 }> 
	onclick="createHtml('<{$faqInfo.table}>','<{$faqInfo.temKey}>',<{$rows.id}>,<{$rows.D_ID}>)" 
	<{elseif $rows.type_id == 1 || $rows.type_id == 2  || $rows.type_id == 4 || $rows.type_id == 7 || $rows.type_id == 8 }>
	onclick="createHtml('<{$orderInfo.table}>','<{$orderInfo.temKey}>',<{$rows.id}>,<{$rows.order_D_ID}>)" 
	<{else}><{/if}>  >
	<{if $rows.D_ID}>
	生成
	<{else}>
		<{if $rows.order_D_ID}>
		生成
		<{elseif $rows.type_id == 1 || $rows.type_id == 2  || $rows.type_id == 4 || $rows.type_id == 7 || $rows.type_id == 8 || $rows.type_id == 6 }>
		生成
		<{/if}>
	<{/if}></a>&nbsp;&nbsp;
    </td>
  </tr>
 <{/foreach}>
  <tr >
	    <td colspan="11"  ><div style="margin-left:10px;">
		 <{$page_url}> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 共有 <span id="total"><{$total}> </span>条记录</div></td>
	</tr>
  </tbody>
</table>
</body>
</html>